//引入api
import {getAdminOrder } from "@/request/api.js";
export default {
    state: {
        pageSize: 10,
        count: 100,
        tableData: [{}],
        currentPage: 1
    },
    mutations: {
        orderattributeList(state, payload) {
            state.tableData = payload.data
            state.count = payload.count
            state.currentPage = payload.currentPage
            state.pageSize = payload.pageSize
        }
    },
    actions: {
        //获取商品属性
       ordergetAdminAttribute({ commit, state }, payload = payload || {}) {
        getAdminOrder({
                page: payload.currnet || state.currentPage,
                size: payload.size || state.pageSize
            }).then(res => {
                console.log("获取order", res.data)
                commit('orderattributeList', res.data)
                    // console.log(state.tableData)
            })
        }
    }
}